ColorUtils

open class ColorUtils

Color utility class.

Functions

Link copied to clipboard
Converts Android color int to GL rgba float array.
Link copied to clipboard
open fun colorToRgbaArray(@ColorInt color: Int): Array<Float>
Converts Android color int to rgba float array.
Link copied to clipboard
open fun colorToRgbaString(@ColorInt color: Int): String
Converts Android color int to "rbga(r, g, b, a)" String equivalent.
Link copied to clipboard
open fun getAccentColor(@NonNull context: Context): Int
Returns a color integer associated as accent color from a theme based on a Context.
Link copied to clipboard
Returns a color integer associated as primary color from a theme based on a Context.
Link copied to clipboard
Returns a color integer associated as primary dark color from a theme based on a Context.
Link copied to clipboard
Returns a color state list associated with a theme based on a Context.
Link copied to clipboard
open fun rgbaToColor(@NonNull value: String): Int
Convert an rgba string to a Color int.
Link copied to clipboard
open fun setTintList(@NonNull imageView: ImageView, @ColorInt tintColor: Int)
Set a color tint list to the Drawable of an ImageView.